

var type = document.scripts[document.scripts.length - 1]
		   .getAttribute("data-type");
var goal = document.scripts[document.scripts.length - 1]
		   .getAttribute("data-goal");

if(void 0 != type && null != type && void 0 != goal && null != goal ) {

	if(type=='pageMonitor'){
	    var scriptStr = '<!-- START MonAdvert Goal Tag | 微信监控 --><script src="http://service.monadvert.com/tag_gen.js" data-goal="'+ goal + '"><\/script><!-- END MonAdvert Goal Tag | 微信监控 -->'
		document.write(scriptStr);

	}else if(type=='areaTouchMonitor'){
		var self = this;
		var longClick = 0;
		$(".touchArea").on({touchstart : function(e) {
								longClick = 0; /*设置初始为0*/
								timeOutEvent = setTimeout(function() {
											$('body').append("<!-- START MonAdvert Goal Tag | 微信监控 --><script type='text/javascript' src='http://service.monadvert.com/tag_gen.js' data-goal='"+goal+"'></script><!-- END MonAdvert Goal Tag | 微信监控 -->");
											longClick = 1; /*假如长按，则设置为1*/
										}, 500);
							},
							touchmove : function() {
								clearTimeout(timeOutEvent);
								timeOutEvent = 0;
								e.preventDefault();
							},
							touchend : function(e) {
								clearTimeout(timeOutEvent);
								if (timeOutEvent != 0 && longClick == 0) { /*点击*/
									/*此处为点击事件----在此处添加跳转详情页*/
									/* alert("b");*/
								}
								return false;
							}
						});


}
}